const ConstTextureLayer = require("./constTextureLayer");
const TileTextureLayer = require("./tileTextureLayer");
const DynamicLineLayer = require("./dynamicLineLayer");
const DrawLine = require("./drawLine");
const LabelLayer = require("./labelLayer");
const DynamicLabelLayer = require("./dynamicLabelLayer");
const ColorLayer = require("./constColorLayer");

const layers = {
    'const-texture': ConstTextureLayer,
    'tile-texture': TileTextureLayer,
    'dynamic-line': DynamicLineLayer,
    'line': DrawLine,
    'label': LabelLayer,
    'dynamicLabel': DynamicLabelLayer,
    'color': ColorLayer
}

module.exports = function getLayer(option) {
    return new layers[option.type](option);
}